/*
 * Copyright (c) 2024. hallele, Inc All rights reserved.
 */

package cn.hallele.infrastructure.metadata.io;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * 请求
 *
 * @author anle5
 * @since 2024/7/26 21:23
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Request<T> implements Serializable {
    @Serial
    private static final long serialVersionUID = 8087335636418261930L;

    /**
     * 请求体指标
     */
    @Schema(description = "请求体指标")
    private Metric metric;

    /**
     * 发起方
     */
    @Schema(description = "发起方")
    private User initiator;

    /**
     * 客户端信息
     */
    @Schema(description = "客户端信息")
    private Equipment client;

    /**
     * 请求体数据
     */
    @Valid
    @Schema(description = "请求体数据")
    private T data;
}
